function Hetdone = finishAuto(Hsep,distribution,gain)
    for k=1:length(gain)
        Hdone(k)=Hsep(distribution(k));                
    end

    for k=1:length(gain)
        Hdone(k)=Hsep(k)*gain(distribution(k));
    end
end